/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package io.renren.controller;


import io.renren.common.utils.Result;
import io.renren.dto.OrderDto;
import io.renren.dto.repon.RepairquotationmRepon;
import io.renren.entity.RepairquotationmEntity;
import io.renren.service.RepairquotationmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * Order接口
 *
 * @author Mark sunlightcs@gmail.com
 */
@RestController
@RequestMapping("/api/Order")
@Api(tags = "Order - 接口")
@AllArgsConstructor
public class ApiOrderController {

    @Autowired
    private RepairquotationmService repairquotationmService;

    @PostMapping("quotationList")
    @ApiOperation("报价单列表")
    public Result<String> quotationList(@RequestHeader("TraderMOID") String traderMOID, @RequestBody OrderDto dto) {
        List<RepairquotationmRepon> repairquotationmEntityList = repairquotationmService.selectListByIsCustomerConfirm(traderMOID, dto.getType());
        return new Result().ok(repairquotationmEntityList);
    }

}